﻿using System;
using System.ComponentModel;
using System.Reflection;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbAuditInfo : OdAuditInfo
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbAuditInfo(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbAuditInfo_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbAuditInfo obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbAuditInfo()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbAuditInfo(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new virtual void printError(string name, string value, string validation, string defaultValue)
		{
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes0))
			{
				TD_DbPINVOKE.OdDbAuditInfo_printErrorSwigExplicitOdDbAuditInfo__SWIG_0(this.swigCPtr, name, value, validation, defaultValue);
			}
			else
			{
				TD_DbPINVOKE.OdDbAuditInfo_printError__SWIG_0(this.swigCPtr, name, value, validation, defaultValue);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void printError(string name, string value, string validation)
		{
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes1))
			{
				TD_DbPINVOKE.OdDbAuditInfo_printErrorSwigExplicitOdDbAuditInfo__SWIG_1(this.swigCPtr, name, value, validation);
			}
			else
			{
				TD_DbPINVOKE.OdDbAuditInfo_printError__SWIG_1(this.swigCPtr, name, value, validation);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void printError(string name, string value)
		{
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes2))
			{
				TD_DbPINVOKE.OdDbAuditInfo_printErrorSwigExplicitOdDbAuditInfo__SWIG_2(this.swigCPtr, name, value);
			}
			else
			{
				TD_DbPINVOKE.OdDbAuditInfo_printError__SWIG_2(this.swigCPtr, name, value);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void printError(OdRxObject pObject, string value, string validation, string defaultValue)
		{
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes3))
			{
				TD_DbPINVOKE.OdDbAuditInfo_printErrorSwigExplicitOdDbAuditInfo__SWIG_3(this.swigCPtr, OdRxObject.getCPtr(pObject), value, validation, defaultValue);
			}
			else
			{
				TD_DbPINVOKE.OdDbAuditInfo_printError__SWIG_3(this.swigCPtr, OdRxObject.getCPtr(pObject), value, validation, defaultValue);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void printError(OdRxObject pObject, string value, string validation)
		{
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes4))
			{
				TD_DbPINVOKE.OdDbAuditInfo_printErrorSwigExplicitOdDbAuditInfo__SWIG_4(this.swigCPtr, OdRxObject.getCPtr(pObject), value, validation);
			}
			else
			{
				TD_DbPINVOKE.OdDbAuditInfo_printError__SWIG_4(this.swigCPtr, OdRxObject.getCPtr(pObject), value, validation);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void printError(OdRxObject pObject, string value)
		{
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes5))
			{
				TD_DbPINVOKE.OdDbAuditInfo_printErrorSwigExplicitOdDbAuditInfo__SWIG_5(this.swigCPtr, OdRxObject.getCPtr(pObject), value);
			}
			else
			{
				TD_DbPINVOKE.OdDbAuditInfo_printError__SWIG_5(this.swigCPtr, OdRxObject.getCPtr(pObject), value);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbAuditInfo() : this(TD_DbPINVOKE.new_OdDbAuditInfo(), true)
		{
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			this.SwigDirectorConnect();
		}

		private void SwigDirectorConnect()
		{
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes0))
			{
				this.swigDelegate0 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_0(this.SwigDirectorprintError__SWIG_0);
			}
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes1))
			{
				this.swigDelegate1 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_1(this.SwigDirectorprintError__SWIG_1);
			}
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes2))
			{
				this.swigDelegate2 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_2(this.SwigDirectorprintError__SWIG_2);
			}
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes3))
			{
				this.swigDelegate3 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_3(this.SwigDirectorprintError__SWIG_3);
			}
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes4))
			{
				this.swigDelegate4 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_4(this.SwigDirectorprintError__SWIG_4);
			}
			if (this.SwigDerivedClassHasMethod("printError", OdDbAuditInfo.swigMethodTypes5))
			{
				this.swigDelegate5 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_5(this.SwigDirectorprintError__SWIG_5);
			}
			if (this.SwigDerivedClassHasMethod("printInfo", OdDbAuditInfo.swigMethodTypes6))
			{
				this.swigDelegate6 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_6(this.SwigDirectorprintInfo);
			}
			if (this.SwigDerivedClassHasMethod("getLastInfo", OdDbAuditInfo.swigMethodTypes7))
			{
				this.swigDelegate7 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_7(this.SwigDirectorgetLastInfo);
			}
			if (this.SwigDerivedClassHasMethod("setLastInfo", OdDbAuditInfo.swigMethodTypes8))
			{
				this.swigDelegate8 = new OdDbAuditInfo.SwigDelegateOdDbAuditInfo_8(this.SwigDirectorsetLastInfo);
			}
			TD_DbPINVOKE.OdDbAuditInfo_director_connect(this.swigCPtr, this.swigDelegate0, this.swigDelegate1, this.swigDelegate2, this.swigDelegate3, this.swigDelegate4, this.swigDelegate5, this.swigDelegate6, this.swigDelegate7, this.swigDelegate8);
		}

		private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes)
		{
			MethodInfo method = base.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, methodTypes, null);
			return method.DeclaringType.IsSubclassOf(typeof(OdDbAuditInfo));
		}

		private void SwigDirectorprintError__SWIG_0([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation, [MarshalAs(UnmanagedType.LPWStr)] string defaultValue)
		{
			this.printError(name, value, validation, defaultValue);
		}

		private void SwigDirectorprintError__SWIG_1([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation)
		{
			this.printError(name, value, validation);
		}

		private void SwigDirectorprintError__SWIG_2([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] string value)
		{
			this.printError(name, value);
		}

		private void SwigDirectorprintError__SWIG_3(IntPtr pObject, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation, [MarshalAs(UnmanagedType.LPWStr)] string defaultValue)
		{
			this.printError(Teigha.Core.Helpers.odrxCreateObjectInternal(pObject, false), value, validation, defaultValue);
		}

		private void SwigDirectorprintError__SWIG_4(IntPtr pObject, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation)
		{
			this.printError(Teigha.Core.Helpers.odrxCreateObjectInternal(pObject, false), value, validation);
		}

		private void SwigDirectorprintError__SWIG_5(IntPtr pObject, [MarshalAs(UnmanagedType.LPWStr)] string value)
		{
			this.printError(Teigha.Core.Helpers.odrxCreateObjectInternal(pObject, false), value);
		}

		private void SwigDirectorprintInfo([MarshalAs(UnmanagedType.LPWStr)] string logInfo)
		{
			this.printInfo(logInfo);
		}

		private IntPtr SwigDirectorgetLastInfo()
		{
			return OdAuditInfo.MsgInfo.getCPtr(this.getLastInfo()).Handle;
		}

		private void SwigDirectorsetLastInfo(IntPtr lastInfo)
		{
			this.setLastInfo(new OdAuditInfo.MsgInfo(lastInfo, false));
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_0 swigDelegate0;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_1 swigDelegate1;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_2 swigDelegate2;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_3 swigDelegate3;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_4 swigDelegate4;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_5 swigDelegate5;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_6 swigDelegate6;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_7 swigDelegate7;

		private OdDbAuditInfo.SwigDelegateOdDbAuditInfo_8 swigDelegate8;

		private static Type[] swigMethodTypes0 = new Type[]
		{
			typeof(string),
			typeof(string),
			typeof(string),
			typeof(string)
		};

		private static Type[] swigMethodTypes1 = new Type[]
		{
			typeof(string),
			typeof(string),
			typeof(string)
		};

		private static Type[] swigMethodTypes2 = new Type[]
		{
			typeof(string),
			typeof(string)
		};

		private static Type[] swigMethodTypes3 = new Type[]
		{
			typeof(OdRxObject),
			typeof(string),
			typeof(string),
			typeof(string)
		};

		private static Type[] swigMethodTypes4 = new Type[]
		{
			typeof(OdRxObject),
			typeof(string),
			typeof(string)
		};

		private static Type[] swigMethodTypes5 = new Type[]
		{
			typeof(OdRxObject),
			typeof(string)
		};

		private static Type[] swigMethodTypes6 = new Type[]
		{
			typeof(string)
		};

		private static Type[] swigMethodTypes7 = new Type[0];

		private static Type[] swigMethodTypes8 = new Type[]
		{
			typeof(OdAuditInfo.MsgInfo)
		};

		public delegate void SwigDelegateOdDbAuditInfo_0([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation, [MarshalAs(UnmanagedType.LPWStr)] string defaultValue);

		public delegate void SwigDelegateOdDbAuditInfo_1([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation);

		public delegate void SwigDelegateOdDbAuditInfo_2([MarshalAs(UnmanagedType.LPWStr)] string name, [MarshalAs(UnmanagedType.LPWStr)] string value);

		public delegate void SwigDelegateOdDbAuditInfo_3(IntPtr pObject, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation, [MarshalAs(UnmanagedType.LPWStr)] string defaultValue);

		public delegate void SwigDelegateOdDbAuditInfo_4(IntPtr pObject, [MarshalAs(UnmanagedType.LPWStr)] string value, [MarshalAs(UnmanagedType.LPWStr)] string validation);

		public delegate void SwigDelegateOdDbAuditInfo_5(IntPtr pObject, [MarshalAs(UnmanagedType.LPWStr)] string value);

		public delegate void SwigDelegateOdDbAuditInfo_6([MarshalAs(UnmanagedType.LPWStr)] string logInfo);

		public delegate IntPtr SwigDelegateOdDbAuditInfo_7();

		public delegate void SwigDelegateOdDbAuditInfo_8(IntPtr lastInfo);
	}
}
